﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using JXT.PrimaryKey.Batman.Domain.Models;

namespace JXT.PrimaryKey.Batman.Domain.Specifications
{
    /// <summary>
    /// 查询条件接口
    /// </summary>
    /// <typeparam name="TEntity">模型类型</typeparam>
    public interface ISpecification<TEntity> where TEntity : IEntity
    {
        /// <summary>
        /// 与其他查询对象条件并列
        /// </summary>
        /// <param name="predicate">查询对象</param>
        void And(Expression<Func<TEntity,bool>> predicate);

        /// <summary>
        /// 与其他查询对象条件或
        /// </summary>
        /// <param name="predicate">查询对象</param>
        void Or(Expression<Func<TEntity, bool>> predicate);
    }
}
